home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000188_icon-group-sender _Thu Aug 15 11:06:35 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  972b

  1. Received: by cheltenham.cs.arizona.edu; Fri, 16 Aug 1996 12:46:05 MST
  2. Date: Thu, 15 Aug 1996 11:06:35 -0700
  3. From: Gregg Townsend <gmt>
  4. Message-Id: <9608151806.AA09531@hawk.CS.Arizona.EDU>
  5. To: icon-group, rjhare@tattoo.ed.ac.uk
  6. Subject: Re: Problem with graphics
  7. Errors-To: icon-group-errors@cs.arizona.edu
  8.  
  9. [ Roger Hare asks how to draw objects atop a grid, then make the grid
  10.   invisible when saving the image. ]
  11.  
  12. Here's another approach inspired by Gordon Peterson's suggestions.
  13.  
  14. Use a mutable color for drawing the grid:
  15.  
  16.     gridcolor := NewColor("pale blue")
  17.     Fg(gridcolor)
  18.     drawgrid()
  19.  
  20.     Fg("black")
  21.     drawobjects()
  22.  
  23. Then make it invisible to save the image:
  24.  
  25.     Color(gridcolor, Bg())
  26.     WriteImage(filename)
  27.  
  28. This works on platforms that support mutable colors, including X windows.
  29.  
  30.    Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W
  31.    Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077
  32.